REM *************************  RunIn ************************
REM This is the Script file of RunIn
REM Project: SL203
REM Release Date: 2011/08/29
REM Author: WeiLee
REM v0.0010: Init Version. Port from S9E14
REM *******************************************************
5 FOREIGN PowerSaving(0)
10 SYSTEM KeyEventDisable()

REM *** Check flash cover ***
20 FOREIGN Ret = Flash_CheckCover2()
21 IF Ret == 0 THEN 22 ELSE 100
22 LET lcdprint = "Open Flash Cover"
23 SYSTEM ScreenString(10,60,lcdprint)
24 SYSTEM delay_us(10000)
25 GOTO 20

REM ******************
REM *** RunIn Test ***
REM ******************
100 LET Ret = 0
110 LET LP = 3
REM ****** RE:Resolution parameter**********
120 LET RE = 13
130 LET TH = 10
140 LET SR = 0
150 LET SP = 0
160 LET DWBP = 0
170 LET CLWBP = 0
REM AutoMode: 0
REM VideoMode: 5
REM PMode:6
180 LET SWITCHMODE_LV = 0
REM 190 LET Capture_43 = 13
REM 191 LET CaptureVGA = 2
REM 200 LET VIDEOResolution = 1
195 LET FLASH_MODE = 8

REM *****************************************
REM *** Set Capture live view mode: Leia&Yoda
REM *****************************************
400 FOREIGN SwitchMode(SWITCHMODE_LV)
REM 405 FOREIGN Resolution(Capture_43)
REM 405 FOREIGN Resolution(CaptureVGA)
410 LET lcdprint = "RunInStart:"
420 SYSTEM ScreenString(10,50,lcdprint)
430 SYSTEM ScreenInt32(200,50,LP)
440 SYSTEM delay_us(1000000)
445 FOREIGN Flash(FLASH_MODE)

REM *************************************
REM *** DFNOneCard
REM *** TestCase: FW_DFN          = 10025
REM *** TestCase: FW_DFN_ONE_CARD = 10028
REM *************************************
450 LET TestCase = 10028
460 FOREIGN Ret = CCD_CCDModuleValidation(TestCase,0,1,0,0,0,0)

REM ************************
REM *** Run in capture loop
REM ************************
510 IF LP > 0 THEN 590
520 FOREIGN Ret = OneCard_FlgSet(0)
530 LET STR = "Loop_Error"
535 FOREIGN KeyReview(0)
540 FOREIGN Ret = OneCard_ErrPrint(STR)
550 END

590 FOREIGN OneCard_RunScriptInit()
600 FOREIGN Ret = OneCard_RunIn(LP, RE, TH, SR, SP, DWBP, CLWBP)
610 IF Ret == 1 THEN 1000
615 SYSTEM KeyEventEnable()
620 FOREIGN Ret = OneCard_FlgSet(0)
630 LET STR = "RunInNG!!"
635 FOREIGN KeyReview(0)
640 FOREIGN Ret = OneCard_ErrPrint(STR)
650 END

REM 800 LET lcdprint = "Delete all"
REM 810 SYSTEM ScreenString(10,70,lcdprint)
REM 820 SYSTEM delay_us(1000000)
REM 830 LET deleteresult = 0
REM 840 FOREIGN deleteresult = FM_DeleteAllFileObjectHandle(0)
REM 850 LET lcdprint = "Delete all End"
REM 860 SYSTEM ScreenString(10,100,lcdprint)

1000 SYSTEM KeyEventEnable()
1010 SYSTEM delay_us(1000000)
1020 FOREIGN ret = OneCard_FlgSet(1)
1030 FOREIGN OneCardTest(1)

10000 END

RUN

